﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using SAC.Helper;
using BLL;

public partial class Admin_Default2 : System.Web.UI.Page
{
    string xzTime = "";
    string excel = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (IniHelper.ReadIniData("Report", "XZTime", null) == "")
                this.drpXZtime.SelectedValue = "no";
            else
                this.XZTime.Value = DateTime.Parse(IniHelper.ReadIniData("Report", "XZTime", null)).ToString("yyyy-MM-dd");


            if (IniHelper.ReadIniData("Report", "Excle", null) == "yes")
                this.drpExcel.SelectedValue = "yes";
            else
                this.drpExcel.SelectedValue = "no";
        }
    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (this.drpXZtime.SelectedValue == "yes")
            xzTime = this.XZTime.Value;
        else
            xzTime = "";

        if (this.drpExcel.SelectedValue == "yes")
            excel = "yes";
        else
            excel = "no";

        IniHelper.WriteIniData("Report", "XZTime", xzTime);
        IniHelper.WriteIniData("Report", "Excle", this.drpExcel.SelectedValue);
    }
}
